<script lang="ts" setup>
import { get, post, Message, loadFile } from '@/utils'
import useOptions from '@/hooks/useOptions'
const emit = defineEmits(['update:val'])
const props = defineProps<{ val: string }>()
const id = ref(props.val)
const { options: treeData } = useOptions({
  api: '/server-open/dict/list',
  query: { code: 'pageLink' },
  fieldName: {
    label: 'dictValue',
    value: 'dictKey',
  },
})
</script>
<template>
  <a-select v-model="id" @change="emit('update:val', id)" :options="treeData" allow-search placeholder="请选择链接" />
</template>
<style lang="less" scoped></style>
